<?php 
class infoAction extends AdminMasterUploadControl{
	public function execute($request){
		$path = $request->getParameter('path', '');
		$json = array(
				'path' 		=> $path,
				'name' 		=> basename($path),
				'width' 	=> 0,
				'height' 	=> 0
			);
		if(!empty($path) && file_exists(sfConfig::get('sf_upload_dir').'/'.$path)){
			$data = getimagesize(sfConfig::get('sf_upload_dir').'/'.$path);
			$json['width'] = intval($data[0]);
			$json['height'] = intval ($data[1]);
		}
		print_r(json_encode($json));
		return sfView::NONE;
	}
}